﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;

namespace BLL
{
    public class testlogin
    {
        public testlogin()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public bool test(string ten, string mk)
        {
            QlbansachollineDataContext db = new QlbansachollineDataContext();
            if (ten != null && mk != null)
            {
                bool ok = db.user_logindatas.Where(nd => nd.username == ten && nd.passwords == mk).FirstOrDefault() != null ? true : false;
                if (ok)
                {
                    try { return true; }
                    catch { return false; }
                }
                else return false;
            }
            else return false;
        
        }
    }
}